{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "%load_ext autoreload\n",
    "%autoreload 2\n",
    "%matplotlib inline\n",
    "import os\n",
    "import sys\n",
    "import matplotlib.pyplot as plt\n",
    "plt.rcParams['figure.figsize'] = [14, 8]\n",
    "\n",
    "sys.path.append('/home/yebotao/OSTrack')\n",
    "from lib.test.analysis.plot_results import plot_results, print_results, print_per_sequence_results, print_results_per_video\n",
    "from lib.test.evaluation import get_dataset, trackerlist"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "outputs": [],
   "source": [
    "dataset_name = 'lasot'\n",
    "\n",
    "trackers = []\n",
    "trackers.extend(trackerlist(name='ostrack', parameter_name='vitb_256_mae_ce_32x4_ep300', dataset_name=dataset_name,\n",
    "                            run_ids=None, display_name='OSTrack256'))\n",
    "trackers.extend(trackerlist(name='ostrack', parameter_name='vitb_384_mae_ce_32x4_ep300', dataset_name=dataset_name,\n",
    "                            run_ids=None, display_name='OSTrack384'))\n",
    "\n",
    "dataset = get_dataset(dataset_name)\n",
    "# plot_results(trackers, dataset, dataset_name, merge_results=True, plot_types=('success', 'prec'),\n",
    "#              skip_missing_seq=False, force_evaluation=True, plot_bin_gap=0.05, exclude_invalid_frames=False)\n",
    "print_results(trackers, dataset, dataset_name, merge_results=True, plot_types=('success', 'prec', 'norm_prec'))\n",
    "# print_results_per_video(trackers, dataset, dataset_name, merge_results=True, plot_types=('success', 'prec', 'norm_prec'),\n",
    "#                         per_video=True, force_evaluation=True)\n",
    "# print_per_sequence_results(trackers, dataset, dataset_name, merge_results=True, plot_types=('success', 'prec', 'norm_prec'))"
   ],
   "metadata": {
    "collapsed": false,
    "pycharm": {
     "name": "#%%\n"
    }
   }
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}